package example.e06_others.e0610;

import org.apache.poi.xssf.usermodel.XSSFCell;

import com.swa99ylum.pxf.cell.styler.CellStyler;

public class ScoreCellStyler extends CellStyler {

	@Override
	public void doStyle(XSSFCell cell, Object cellValue) {
		
		int score = (int) cellValue;
		
		//System.out.println("score ==>" + score);
		
		if(90<=score && score<=100) {
			cell.setCellStyle(getStyle("A5"));
			
		}else if(80<=score && score<=89) {
			cell.setCellStyle(getStyle("B5"));
			
		}else if(70<=score && score<=79) {
			cell.setCellStyle(getStyle("C5"));
			
		}else if(60<=score && score<=69) {
			cell.setCellStyle(getStyle("D5"));
			
		}else if(00<=score && score<=59) {
			cell.setCellStyle(getStyle("E5"));
			
		}else {
			cell.setCellStyle(getStyle("F5"));
		}
		
	}

}
